package net.chrisrichardson.ec2deployer.core

interface CloudManager {
    CloudCommandExecutor getSsh()

    EC2Server findInstance(String id)

    List<EC2Server> newServers(int n, String instanceType, Map<String, String> extraParams)
    List<EC2Server> newServers(int n, String instanceType)
    List<EC2Server> newServers(int n)

    List reserve(int n, String instanceType)

    void stop(EC2Server server)

    List<EC2Server> getServers()

    AWSProperties getAwsProperties()

    void pollStatus()

    void startPolling(frequency)
    
    List<EC2Server> newServersElsewhere(int n, String instanceType, EC2Server otherServer, Map<String,String> xtraParams)

    boolean associateAddress(EC2Server ec2Server, String externalIpAddress)

    String getStartupScript()

    void setDefaultProcessMonitor(ProcessMonitor pm)

    void setServers(List<EC2Server> servers)

}
